//
//  XLImageView.m
//  campus
//
//  Created by xl on 2019/11/15.
//  Copyright © 2019 xl. All rights reserved.
//

#import "XLImageView.h"



@interface XLImageView ()

@property (nonatomic, copy) XLImageTouchBlock touchBlock;

@end

@implementation XLImageView

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    if (self.touchBlock) {
        self.touchBlock();
    }
}

- (void)setTouchBegan:(XLImageTouchBlock)block{
    self.userInteractionEnabled = YES;
    self.touchBlock = block;
    
}



@end
